package com.wds.domain.entity;

import java.util.Date;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.NumberFormat;
import com.alibaba.excel.converters.longconverter.LongStringConverter;
import com.alibaba.excel.converters.string.StringNumberConverter;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * 分类表(Category)表实体类
 *
 * @author makejava
 * @since 2022-10-21 15:20:04
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("wds_category")
public class Category implements Serializable {
    //    EasyExcel导出Long类型精度丢失问题   使用字符串的形式导出
    @ExcelProperty(value = "ID", converter = LongStringConverter.class)
    private Long id;
    //分类名
    @ExcelProperty("分类名称")
    private String name;
    //父分类id，如果没有父分类为-1
    @ExcelProperty(value = "父分类ID", converter = LongStringConverter.class)
    private Long pid;
    //描述
    @ExcelProperty("分类描述")
    private String description;
    //状态0:正常,1禁用
    @ExcelProperty("禁用状态，1是")
    private String status;

    @TableField(fill = FieldFill.INSERT)
    @ExcelIgnore
    private Long createBy;
    @ExcelIgnore
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    @ExcelIgnore
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long updateBy;
    @ExcelIgnore
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
    //删除标志（0代表未删除，1代表已删除）
    @ExcelIgnore
    private Integer delFlag;

}

